package com.qf.shoppingorder.service;

import com.qf.shoppingorder.entity.Product;
import entity.ResultData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

// todo 8openfeign 被调用应用名
@FeignClient("shopping-product-server")
public interface ProductService {

    // todo 8openfeign 被调用url路径 如果服务提供者设置了context-path,则此处也要加上
    @GetMapping("/shopping-product-server/product/all")
    ResultData a();

    @GetMapping("/shopping-product-server/product/{id}")
    Product getOneById(@PathVariable(value = "id") Integer id);

    @GetMapping("/shopping-product-server/product/decrease")
    ResultData decrease(@PathVariable(value = "id") Integer id);
}
